package com.virgo.demo.support.controller.admin;

import com.virgo.common.entity.IResponse;
import com.virgo.common.entity.ListDataVo;
import com.virgo.demo.core.annotation.Log;
import com.virgo.demo.support.domain.vo.OperationLogVo;
import com.virgo.demo.support.service.OperationLogService;
import jakarta.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/manage168/operationLog")
@RequiredArgsConstructor
public class OperationLogController {

	private final OperationLogService operationLogService;

    @Log(permission = "operation_log_list", saveLog = false)
	@RequestMapping(value = "/list", method = RequestMethod.POST)
	public IResponse<ListDataVo<OperationLogVo>> listAction(HttpServletRequest request) {
		return IResponse.ok(operationLogService.findList(request));
	}
}